package com.he.DesignPatterns.strategy.demo1;

//简单工厂模式
public class CashFactory {

    public static CashSuper createCashAdaptor(String type){
        switch (type) {
            case "正常":
                return new CashNormal();
            case "八折":
                return new CashDiscount(0.8);
            default:
                break;
        }
        return null;
    }
}
